package cn.sju.tq.entities;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.*;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student {
    private String stuId;//学号
    private String name;//姓名
    private String[] telephones;//联系电话
    private List<String> hobbies;//兴趣爱好
    private Set<String> emails;//邮箱地址
    private Map<String,Integer> subjectScores;//选修课程及成绩
    private Properties loginConfigs;//保存登录权限配置信息，类似于Map集合
    private Set<Student> roommates;//室友
    //提供对应的getter/setter方法
    public String getStuId() {
        return stuId;
    }
    public void setStuId(String stuId) {
        this.stuId = stuId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String[] getTelephones() {
        return telephones;
    }
    public void setTelephones(String[] telephones) {
        this.telephones = telephones;
    }
    public List<String> getHobbies() {
        return hobbies;
    }
    public void setHobbies(List<String> hobbies) {
        this.hobbies = hobbies;
    }
    public Set<String> getEmails() {
        return emails;
    }
    public void setEmails(Set<String> emails) {
        this.emails = emails;
    }
    public Map<String, Integer> getSubjectScores() {
        return subjectScores;
    }
    public void setSubjectScores(Map<String, Integer> subjectScores) {
        this.subjectScores = subjectScores;
    }
    public Properties getLoginConfigs() {
        return loginConfigs;
    }
    public void setLoginConfigs(Properties loginConfigs) {
        this.loginConfigs = loginConfigs;
    }
    public Set<Student> getRoommates() {
        return roommates;
    }
    public void setRoommates(Set<Student> roommates) {
        this.roommates = roommates;
    }

    @Override
    public String toString() {
        return "Student [stuId=" + stuId + ", name=" + name + ", \r\n telephones=" + Arrays.toString(telephones)
                + ", \r\n hobbies=" + hobbies + ", \r\n emails=" + emails + ", \r\n subjectScores="
                + subjectScores + ", \r\n loginConfigs="+ loginConfigs + "]";
    }
}
